fix(windows): 主窗口改为不透明——消除录音时 DWM/GPU 饱和导致的系统卡顿 - #882
Merged
H-Chris233 merged 1 commit intoAug 2, 2026
Conversation
主窗口 transparent:true 使 WebView2 内容整页走 per-pixel alpha 分层合成, 但 UI 所有大面积层(winchrome/shell/sidebar/内容区)都是不透明背景, Mica 磨砂实际被完全盖住,透明是纯 GPU 成本零视觉收益。 录音期间叠加胶囊 60fps WebGL + 30Hz 事件,DWM 被拖到饱和时: - 其他软件合成帧送不出去 → 全局无响应 - 任务栏右键触发缩略图/重合成 → GPU 飙升 新增 tauri.windows.conf.json 平台覆盖(json_patch 数组整体替换, 必须完整列出窗口),main 窗口 transparent:false,capsule 保留透明。 macOS/Linux 不受影响。参考 tauri.linux.conf.json 既有先例。
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
问题
Windows 版录音期间出现三个症状(用户报告,v1.3.14):
根因
tauri.conf.json中main窗口(1240×800)为transparent: true,导致 WebView2 内容整页走 per-pixel alpha 分层合成。但主窗口 UI 所有大面积层(winchrome / shell / sidebar / 内容区)都是不透明背景(--ol-window-bg、--ol-app-shell-bg、--ol-sidebar-bg、--ol-surface),Windows 的 Mica 磨砂(apply_mica)实际被完全盖住——透明是纯 GPU 成本、零视觉收益。录音期间叠加胶囊窗口 60fps WebGL(SiriGL)+ 30Hz
capsule:state事件,GPU/DWM 被拖到饱和后:改动
新增
tauri.windows.conf.json平台覆盖(与既有tauri.linux.conf.json同机制):main窗口transparent: true → false(唯一行为变化)capsule窗口保持transparent: true(真透明浮窗,纯光效无底,视觉依赖 alpha)验证建议
PR Type
Bug fix
Description
Add Windows platform override disabling main window transparency
Prevent per-pixel alpha compositing that saturated GPU/DWM
Preserve capsule window transparency for overlay UI
Reduce system-wide stutter during recording on Windows
Diagram Walkthrough
File Walkthrough
tauri.windows.conf.json
Add Windows config disabling main window transparencyopenless-all/app/src-tauri/tauri.windows.conf.json